//
//  WithdrawView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/26.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "WithdrawView.h"
#import <Masonry.h>
@implementation WithdrawView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews
{
    self.backgroundColor = [UIColor whiteColor];
    
    
    self.withdrawtoLab = [[UILabel alloc] init];
    self.withdrawtoLab.text = @"提现至";
    self.withdrawtoLab.textColor = ETColorWithRGB(153, 153, 153);
    self.withdrawtoLab.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.withdrawtoLab];
    [self.withdrawtoLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.mas_equalTo(30);
    }];
    
    
    self.withdrawtoLab = [[UILabel alloc] init];
    self.withdrawtoLab.text = @"提现至";
    self.withdrawtoLab.textColor = ETColorWithRGB(153, 153, 153);
    self.withdrawtoLab.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.withdrawtoLab];
    [self.withdrawtoLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.mas_equalTo(30);
    }];
    
    self.tailNumberLab = [[UILabel alloc] init];
    self.tailNumberLab.text = @"";
    self.tailNumberLab.textColor = ETColorWithRGB(153, 153, 153);
    self.tailNumberLab.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.tailNumberLab];
    [self.tailNumberLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-20);
        make.centerY.equalTo(self.withdrawtoLab);
    }];
    
    self.bankNameLab = [[UILabel alloc] init];
    self.bankNameLab.text = @"";
    self.bankNameLab.textColor = ETColorWithRGB(51, 51, 51);
    self.bankNameLab.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.bankNameLab];
    [self.bankNameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.tailNumberLab.mas_left);
        make.centerY.equalTo(self.withdrawtoLab);
    }];
    
    self.topLineView = [[UIView alloc] init];
    self.topLineView.backgroundColor = ETColorWithRGB(229, 229, 229);
    [self addSubview:self.topLineView];
    [self.topLineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.withdrawtoLab);
        make.right.equalTo(self.tailNumberLab);
        make.top.equalTo(self.withdrawtoLab.mas_bottom).offset(10);
        make.height.mas_equalTo(1);
    }];
    
    self.ableWithdrawLab = [[UILabel alloc] init];
    self.ableWithdrawLab.text = @"";
    self.ableWithdrawLab.textColor = ETColorWithRGB(51, 51, 51);
    self.ableWithdrawLab.font = [UIFont systemFontOfSize:14];
    [self addSubview:self.ableWithdrawLab];
    [self.ableWithdrawLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.withdrawtoLab);
        make.top.equalTo(self.topLineView.mas_bottom).offset(20);
    }];
    
    
    self.withdrawtoLab = [[UILabel alloc] init];
    self.withdrawtoLab.text = @"提现至";
    self.withdrawtoLab.textColor = ETColorWithRGB(153, 153, 153);
    self.withdrawtoLab.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.withdrawtoLab];
    [self.withdrawtoLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.mas_equalTo(30);
    }];
    
    self.withdrawAmountLab = [[UILabel alloc] init];
    self.withdrawAmountLab.text = @"收款金额";
    self.withdrawAmountLab.textColor = ETColorWithRGB(153, 153, 153);
    self.withdrawAmountLab.font = [UIFont systemFontOfSize:16];
    [self addSubview:self.withdrawAmountLab];
    [self.withdrawAmountLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.withdrawtoLab);
        make.top.equalTo(self.ableWithdrawLab.mas_bottom).offset(20);
    }];
    
    
    
    self.symbolLab = [[UILabel alloc] init];
    self.symbolLab.text = @"￥";
    self.symbolLab.textColor = [UIColor blackColor];
    self.symbolLab.font = [UIFont systemFontOfSize:48];
    [self addSubview:self.symbolLab];
    [self.symbolLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(20);
        make.top.equalTo(self.withdrawAmountLab.mas_bottom).offset(10);
        make.width.mas_equalTo(50);
    }];
    
    
    
    self.visableTf = [[UITextField alloc] init];
    self.visableTf.font = [UIFont systemFontOfSize:48];
    [self addSubview:self.visableTf];
    [self.visableTf mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.symbolLab.mas_right);
        make.centerY.equalTo(self.symbolLab);
        make.right.mas_equalTo(-10);
        make.height.equalTo(self.symbolLab);
    }];
    
    
    self.bottomLineView = [[UIView alloc] init];
    self.bottomLineView.backgroundColor = ETColorWithRGB(229, 229, 229);
    [self addSubview:self.bottomLineView];
    [self.bottomLineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.withdrawtoLab);
        make.right.equalTo(self.tailNumberLab);
        make.top.equalTo(self.symbolLab.mas_bottom).offset(10);
        make.height.mas_equalTo(1);
    }];
    
    self.tipsLab = [[UILabel alloc] init];
    self.tipsLab.text = @"根据国家相关税法法规，将扣除6%税费";
    self.tipsLab.font = [UIFont systemFontOfSize:13];
    self.tipsLab.textColor = ETColorWithRGB(138, 146, 199);
    [self addSubview:self.tipsLab];
    [self.tipsLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.bottomLineView);
        make.top.equalTo(self.bottomLineView.mas_bottom).offset(10);
    }];
    
}

@end
